package bocchi.card;

import bocchi.base.BaseCustomCard;
import bocchi.BocchiCore;
import bocchi.base.BaseCustomPower;
import bocchi.general.Util;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;

public class LoveAtFirstSight extends BaseCustomCard {
    public static final String RAW_ID = LoveAtFirstSight.class.getSimpleName();
    public static final String GAME_ID = BocchiCore.getGameID(RAW_ID);

    public LoveAtFirstSight() {
        super(RAW_ID);
    }

    public void use(AbstractPlayer player, AbstractMonster monster) {
        BaseCustomPower power = new BaseCustomPower(RAW_ID, AbstractPower.PowerType.BUFF, player, magicNumber) {
            @Override
            public void onPlayCard(AbstractCard card, AbstractMonster m) {
                if (card instanceof BaseCustomCard && ((BaseCustomCard) card).isType(TypeFlag.RYO)) {
                    Util.randomDamage(player, amount);
                }
            }
        };

        Util.applyPower(player, player, power);
    }
}
